package android.FiltrosJava;

public class ColorReduction extends PointFilter{
	protected int base = 32;
	public void set512Cores(){
		base = 32;
	}
	
	public void set4096Cores(){
		base = 16;
	}
	
	public void set64Cores(){
		base = 64;
	}
	
	public int[] computeFilter(int px, int py, int[] imageData){		
		for (int y = 0; y < 3; y++){
			if (imageData[y] < 255){
				imageData[y] = base * (int)(imageData[y]/base);
			}			
		}
			
		return imageData;
	}
	
}